Spotted by darkxst on IRC.
https://bugzilla.gnome.org/show_bug.cgi?id=683073
/* Utility functions...we should probably be able to use these
* in the shell core code too. */
'const stage = global.stage; ' +
- 'const color = function(pixel) { let c= new Clutter.Color(); c.from_pixel(pixel); return c; }; ' +
/* Special lookingGlass functions */
'const it = Main.lookingGlass.getIt(); ' +
'const r = Lang.bind(Main.lookingGlass, Main.lookingGlass.getResult); ';
*/
setCrosshairsColor: function(color) {
if (this._crossHairs) {
- let clutterColor = new Clutter.Color();
- clutterColor.from_string(color);
+ let [res, clutterColor] = Clutter.Color.from_string(color);
this._crossHairs.setColor(clutterColor);
}
},
* @color: The color as a Clutter.Color.
*/
getColor: function() {
- let clutterColor = new Clutter.Color();
- this._horizLeftHair.get_color(clutterColor);
- return clutterColor;
+ return this._horizLeftHair.get_color();
},
/**
const Util = imports.misc.util;
const OVERRIDES_SCHEMA = 'org.gnome.shell.overrides';
-const DEFAULT_BACKGROUND_COLOR = new Clutter.Color();
-DEFAULT_BACKGROUND_COLOR.from_pixel(0x2266bbff);
+const DEFAULT_BACKGROUND_COLOR = Clutter.Color.from_pixel(0x2266bbff);
let automountManager = null;
let autorunManager = null;